package com.rock.code.bigdata.type.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import com.rock.code.base.service.impl.BaseServiceImpl;
import com.rock.code.bigdata.type.dao.TbSysTypeDao;
import com.rock.code.bigdata.type.domain.TbSysType;
import com.rock.code.bigdata.type.service.TbSysTypeService;
import com.rock.code.common.handover.DataSource;
import com.rock.code.common.pager.Page;
import com.rock.code.system.roleModule.domain.TbSysRoleModule;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * @author piandu
 * @description 资源实现类
 * @date 2018/9/14 16/34
 */
@Service
public class TbSysTypeServiceImpl extends BaseServiceImpl<TbSysTypeDao> implements TbSysTypeService {


    @Resource
    private TbSysTypeDao tbSysTypeDao;

    @Override
    public PageInfo queryPageListType(Page page, Map<String, Object> param) throws Exception {
        String orderBy = "";
        if (!StringUtil.isEmpty(page.getSidx())) {
            orderBy = this.getOrderBy(page);
        }
        PageHelper.startPage(page.getPage(), page.getRows());
        if (!orderBy.equals("")) {
            PageHelper.orderBy(orderBy);
        }
        List<TbSysType> list = tbSysTypeDao.queryPageListType(param);
        return new PageInfo(list);
    }




    @Override
    public List queryData(Map map) {
        return tbSysTypeDao.queryData(map);
    }


    @Override
    public int insert(TbSysType tbSysType) throws Exception {
        return 0;
    }

    @Override
    public int delete(String primaryKey) throws Exception {
        return 0;
    }

    @Override
    public int deleteByParam(Map<String, Object> param) throws Exception {
        return 0;
    }

    @Override
    public int update(TbSysType tbSysType) throws Exception {
        return 0;
    }

    @Override
    public TbSysType query(TbSysType tbSysType) throws Exception {
        return null;
    }

    @Override
    public TbSysType queryByParaMap(Map<String, Object> param) throws Exception {
        return null;
    }

    @Override
    public List<TbSysType> queryList(TbSysType tbSysType) throws Exception {
        return null;
    }

    @Override
    public List<TbSysType> queryListByParaMap(Map<String, Object> param) throws Exception {
        return null;
    }

    @Override
    public PageInfo<TbSysType> queryPageList(Page page, Map<String, Object> param) throws Exception {
        return null;
    }

    @Override
    public List<TbSysType> queryListByOrder(Page page, Map<String, Object> param) throws Exception {
        return null;
    }
}
